package project.menu.garagemenu;

import project.controllers.CreatorObject;
import project.menu.IMenu;
import project.menu.IMenuItem;
import project.work.Navigator;
import controllers.IAutoservice;

public class CreatorGarage implements IMenuItem {
	private String name = "Add garage";
	private final Integer id = 4;
	private static IMenu submenu;
	private Navigator n;
	
	public CreatorGarage(){
		n=Navigator.getInstance();
	}

	
	public static void setSubmenu(IMenu menu){
		 submenu=menu;
	}
	
	public void action(IAutoservice aut) {
	//add garage
		aut.addGarage(CreatorObject.addGarage());
		n.drawMenu(submenu);

	}

	public String getNameItem() {
		return name;
	}

	
	public Integer getId(){
		return id;
	}
	
	

}
